package com.ruoyi.web.tdm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdm.mapper.TdmKangTiYaoWuMapper;
import com.ruoyi.web.tdm.domain.TdmKangTiYaoWu;
import com.ruoyi.web.tdm.service.ITdmKangTiYaoWuService;

/**
 * 抗体药物Service业务层处理
 * 
 * @author ly
 * @date 2022-03-11
 */
@Service
public class TdmKangTiYaoWuServiceImpl implements ITdmKangTiYaoWuService 
{
    @Autowired
    private TdmKangTiYaoWuMapper tdmKangTiYaoWuMapper;

    /**
     * 查询抗体药物
     * 
     * @param id 抗体药物主键
     * @return 抗体药物
     */
    @Override
    public TdmKangTiYaoWu selectTdmKangTiYaoWuById(Long id)
    {
        return tdmKangTiYaoWuMapper.selectTdmKangTiYaoWuById(id);
    }

    /**
     * 查询抗体药物列表
     * 
     * @param tdmKangTiYaoWu 抗体药物
     * @return 抗体药物
     */
    @Override
    public List<TdmKangTiYaoWu> selectTdmKangTiYaoWuList(TdmKangTiYaoWu tdmKangTiYaoWu)
    {
        return tdmKangTiYaoWuMapper.selectTdmKangTiYaoWuList(tdmKangTiYaoWu);
    }

    /**
     * 新增抗体药物
     * 
     * @param tdmKangTiYaoWu 抗体药物
     * @return 结果
     */
    @Override
    public int insertTdmKangTiYaoWu(TdmKangTiYaoWu tdmKangTiYaoWu)
    {
        tdmKangTiYaoWu.setCreateTime(DateUtils.getNowDate());
        return tdmKangTiYaoWuMapper.insertTdmKangTiYaoWu(tdmKangTiYaoWu);
    }

    /**
     * 修改抗体药物
     * 
     * @param tdmKangTiYaoWu 抗体药物
     * @return 结果
     */
    @Override
    public int updateTdmKangTiYaoWu(TdmKangTiYaoWu tdmKangTiYaoWu)
    {
        tdmKangTiYaoWu.setUpdateTime(DateUtils.getNowDate());
        return tdmKangTiYaoWuMapper.updateTdmKangTiYaoWu(tdmKangTiYaoWu);
    }

    /**
     * 批量删除抗体药物
     * 
     * @param ids 需要删除的抗体药物主键
     * @return 结果
     */
    @Override
    public int deleteTdmKangTiYaoWuByIds(Long[] ids)
    {
        return tdmKangTiYaoWuMapper.deleteTdmKangTiYaoWuByIds(ids);
    }

    /**
     * 删除抗体药物信息
     * 
     * @param id 抗体药物主键
     * @return 结果
     */
    @Override
    public int deleteTdmKangTiYaoWuById(Long id)
    {
        return tdmKangTiYaoWuMapper.deleteTdmKangTiYaoWuById(id);
    }
}
